<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="DoMain.Department" %>
<%@ page import="java.util.*" %>
<%@page import="java.text.SimpleDateFormat"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
 <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

<title>updateRegist</title>
</head>
<body>
<% 
		Object msg=request.getAttribute("message");
		if(msg!=null){	
	%>
	
	<font color="red"><%=msg %></font>
	
	<%	} %>
	
	<%	
	String departNo=null;
	String departName=null;
		
	Department department=(Department)request.getAttribute("department");	
	
	if(department!=null){
		
		departNo=department.getDepartNo()+"";
		departName=department.getDepartName();

	%>
	
	<% }else{
		departNo=request.getParameter("departNo");
		departName=request.getParameter("departName");
	}
	%>
	
	<form action="updateDepartment.Co" method="post">
	
	<input type="hidden" name="departNo" value="<%=departNo%>">


	<div class="input-group">
    <span class="col-sm-2 col-form-label">学院名编号:</span>
	<input type="text" name="departNo" value="<%=departNo%>">
	</div>
	<div class="input-group">
    <span class="col-sm-2 col-form-label">学院名称:</span>
	<input type="text" name="departName" value="<%=departName%>">
	</div>
 	<div class="input-group">
    <button type="submit" class="btn btn-primary">Submit</button>
    </div>
	</form>
</body>
</html>